package com.client.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RadissonConfiguration {

    @Bean
    public RedissonClient redissonClient(){
        // 配置对象
        Config config = new Config();
        //单节点 地址 redis://ip:6379
        config.useSingleServer().setAddress("redis://8.138.148.199:6379")
                .setPassword("20020808");
        //创建配置
        return Redisson.create(config);
    };

}
